
##master-page:DockStarTemplate

||<tablestyle="float: right; margin: 0px;" style="padding: 0.5em; border: 0px none; font-size: 100%;"><<TableOfContents>> ||

== Arduino Pro Mini ==

I needed an 2 channel '''Analog/Digital converter''' with 10 bit resolution and I2C bus, with minimal cost and effort. To my surprise it looks like, that an Arduino Pro Mini module from China just made it for 2.50 EUR, including shipping, see [[http://ebay.com]] (search for: PRO MINI ATMEGA328 5V/16M).

If you buy via [[http://ebay.de]] take care about the '''original Arduino layout''' with the '''right boot loader installed'''.

 * Dimensions: 18 x 33 mm
 * [[http://arduino.cc/en/Main/ArduinoBoardProMini|Arduino Pro Mini description]]

The version from '''gc_supermarket''' has a '''layout change''', which is of benefit, because you have now an ISP (In System Programming) connector at the left side (6 pins), see the '''pictures''' (click on the picture to '''enlarge'''). Fortunately the pinout to the '''Serial-USB converter''' is the same.

||[[attachment:Arduino_[[ProMini]]_upper_DSC05048.jpg|{{attachment:Arduino_[[ProMini]]_upper_DSC05048.jpg||width="320"}}]]||[[attachment:Arduino_ProMiniO_lower_DSC05054.jpg|{{attachment:Arduino_[[ProMini]]_lower_DSC05049.jpg||width="320"}}]]||

The '''original version''' looks like:

||[[attachment:Arduino_ProMiniO_upper_DSC05053.jpg|{{attachment:Arduino_ProMiniO_upper_DSC05053.jpg||width="320"}}]]||[[attachment:Arduino_[[ProMini]]_lower_DSC05049.jpg|{{attachment:Arduino_ProMiniO_lower_DSC05054.jpg||width="320"}}]]||

||<tablestyle="float:right;">[[attachment:Arduino_[[ProMini]]_AVRISP_DSC05045.jpg|{{attachment:Arduino_[[ProMini]]_AVRISP_DSC05045.jpg||width="320"}}]]||

=== AVR ISP programmer ===

A very cheap ISP programmer can be bought [[http://www.ehajo.de/Bausaetze/AVR-ISP-Stick?source=2&refertype=1&referid=5|AVR-USB-Stick]] for  10 EUR inclusive shipping (kit). The tutorial is [[http://dokuwiki.ehajo.de/bausaetze:avr-isp-stick-aufbau|here]]. More details can be found at [[http://www.mikrocontroller.net/articles/AVR-ISP-Stick|Mikrocontroller]]. The original development was done at [[http://www.ladyada.net/make/usbtinyisp/download.html|LadyAda (Software)]].

=== USB to Serial Converter ===

||[[attachment:Arduino_[[ProMini]]_CP2102_DSC05044.jpg|{{attachment:Arduino_[[ProMini]]_CP2102_DSC05044.jpg||width="320"}}]]||[[attachment:Arduino_[[ProMini]]_CP2102_DSC05046.jpg|{{attachment:Arduino_[[ProMini]]_CP2102_DSC05046.jpg||width="320"}}]]||

When you search on [[http://ebay.de]] for the title "CP2102 Module Modul USB to TTL Converter Konverter" (no. 280736990675
, seller: ether.deal) you will find a module which also has the important signal '''DTR''' brought out to a solder point (green wire). Here you have to solder a pin, to connect to the Arduino Pro Mini module. Price about 4.30 EUR inclusive shipping.

=== Software, Arduino ===

The program was developed with '''Arduino IDE''' Version 1.0.5, with the '''wire library'''.

Usually an Arduino module will come with the '''boot loader''' preinstalled. In this case it was not the right boot loader. The '''green LED''' switches ON, when you power up the module, but the connection to the PC with an '''USB/Serial converter''' will fail. So, I had to solder the 6 pins for the ISP programming and flashed the proper Arduino boot loader with an '''ISP programmer'''. 

Select from the Arduino IDE menu '''Tools''' the '''programmer''' "USBtinyISP", the '''board''' "Arduino Mini or Pro Mini (5V, 16 MHz)w/ ATmega328". Then click on '''Install Bootloader'''. Even when the module is powered with 3.3V only, the 16 MHz clock works stable.

Next step is to connect a '''USB/Serial converter''' with the pins:

{{{
   Arduino     USB/Serial
signal color   signal note
GND    brown   GND
RXD    red     RXD    to Arduino
TXD    orange  TXD    from Arduino
+5V    yellow  +5V
DTR    green   DTR    for Reset pulse
}}}

The trick with the programming via USB is, that via DTR pulse a Reset signal will start the boot loader. If within a few seconds the programmer (avrdude) responds, the flash ROM programming will start.

For an easier Arduino programming start read [[http://arduino.cc/en/Guide/HomePage|Getting started]]. 

The analog value will be averaged with 8 samples, in order to reduce the noise.

For help with the '''C''' programming look at the [[http://arduino.cc/en/Reference/HomePage|Language Reference]].

If you want to get the '''hex''' file of the compiled program, select in Arduino/Preferences verbose output at compile time. Then you can see in the output window the file path of the '''hex file''', and copy it to an other place. Because this path will be deleted, when you quit the Arduino IDE.

=== A/D Converter Hardware ===

For the schematic have a look at [[RaspberryPiWobbulator#A.2FD_converter.2C_hardware_Nano3]].

=== Low power operation ===

Normally the Arduino Pro Mini draws about 10 mA, when using the '''RAW''' supply input.

For low power operation please see at Link #4.

=== Links ===

 1. [[http://www.ladyada.net/learn/avr/avrdude.html|avrdude tutorial for Windows]]
 1. [[http://savannah.nongnu.org/projects/avrdude|avrdude home, download]]
 1. [[/ADCNano3.ino|A/D converter program source code]]
 1. [[http://www.thalin.se/2013/04/arduino-pro-mini-low-power-modification.html|Arduino Pro Mini low power modification]]

=== List of pages in this category: ===

<<FullSearch(category:CategoryAVR)>>

-- [[RudolfReuter]] <<DateTime(2013-12-19T12:47:23Z)>>

Gehe zurück zu [[%20| ]] oder [[StartSeite]] ; [[KontaktEmail]] ([[ContactEmail]])
